package com.cqjtu.email;

import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

/**
 * Created by Administrator on 2016/11/16 0016.
 */
public class MyActivity extends Activity implements View.OnClickListener{
    private Button recevier_text;
    private Button send_text;


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_my);

        initView();
        initEvents();

    }

    private void initView() {
        recevier_text = (Button) findViewById(R.id.id_receiver_text);
        send_text = (Button) findViewById(R.id.id_send_text);


    }



    private void initEvents() {
        recevier_text.setOnClickListener(this);
        send_text.setOnClickListener(this);

    }



    @Override
    public void onClick(View view) {

        switch (view.getId()){
            case R.id.id_send_text:
                Intent intent = new Intent(MyActivity.this,SendActivity.class);
                startActivity(intent);
                break;
            case R.id.id_receiver_text:
                Intent intent2 = new Intent(MyActivity.this,ReceiveActivity.class);
                startActivity(intent2);
                break;


        }

    }

}
